﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using QLTH_DTO;

namespace QLTH_DATASSECC
{
  public class clsDanTocDA : ConnectionData.clsKetNoi
    {
      String _sql;
      public DataTable DanhSachDanToc()
      {
          _sql = "SELECT MADT, TENDANTOC FROM DANTOC";
          return Load_DataTable(_sql);
      }

      public string Laymadt(String _dk)
      {
          _sql = "SELECT MADT FROM DANTOC WHERE TENDANTOC = N'" + _dk + "'";
          return laymadk(_sql).ToString();
      }

      //public int Them_DanToc(clsDanTocDTO dtDTO)
      //{
      //    _sql = "INSERT INTO DANTOC VALUES('" + dtDTO.Tendt + "')";
      //    return Nonquery(_sql);
      //}
    }
}
